{include file="public/header" /}
<link rel="stylesheet" href="/static/index/css/refund.css?v=<?php echo time();?>">
<body class="hide-top bgc">
<div class="submit-container">
    <img src="/static/index/img/icon78.png" alt="">
    <div class="submit-content">
        <div class="submit-hd flex-center">
            <i class="layui-icon layui-icon-left"></i>申请退款
        </div>

        <div class="order-det-staute" style="padding: 0.25rem 0.9375rem;">
            <p class="order-det-status">退款商品</p>
        </div>

        <div class="submit-pro">
            <ul class="submit-pro-list">
                {foreach name="info.productsField" item="vo"}
                <li>
                    <p class="flex-center">
                        <img src="{$vo.icon}" alt="">
                    </p>
                    <div class="center">
                        <p class="multi">{$vo.title}</p>
                        <p class="spec">{$vo.spec}</p>
                    </div>
                    <div class="rgt">
                        <p class="price">￥<span>{$vo.vip_price}</span></p>
                        <p>x{$vo.num}</p>
                    </div>
                </li>
                {/foreach}
            </ul>
        </div>
        <div class="submit-pro">
            <h2>退款信息</h2>
            <ul class="submit-pro-form">
                <li>
                    <p>退款类型<span style="color: red;">*</span><input type="text"  class="reason" readonly placeholder="{$type==1?'仅退款':'退货退款'}"/></p>
                </li>
                <li>
                    <p>退款原因<span style="color: red;">*</span><input type="text" id="reason" class="reason"  placeholder="请输入退款原因"/></p>
                </li>
                <li class="real-money">
                    <p>退款金额<span>*</span><span style="float: right;">￥{$info.real_amount}</span></p>
                    <p>不可修改，最多￥{$info.real_amount}，含发货邮费￥{$info.freight}</p>
                </li>
            </ul>
        </div>
        <div class="submit-pro">
            <h2>补充描述信息</h2>
            <ul class="set-list autonym-list">
                <li class="issue">
                    <textarea  id="note" placeholder="请输入您的补充描述" style="height: 100px;width:100%;"></textarea>
                </li>
                <li class="complain-imgs" >
                    <p class="flex-center" style="width: 100%;height: 100px;justify-content: left !important;">
                        <img src="" alt="" id="image_show" style="margin-right: 10px;">
                        <img src="/static/index/img/icon15.png" alt="" id="uploads_image">
                        <input type="hidden"  id="images_value"/>
                    </p>
                </li>
            </ul>
        </div>
    </div>
</div>

<div class="orderDet-footer">
    <p class="flex-center submitbtn submit">提交</p>
</div>

</body>
{include file="public/footer"/}
<script>
    $(".submit").click(function () {
        edit('确定申请退款吗？')
    })

    function edit(msg) {
        layer.confirm(msg, {title: '请确认'}, function () {
            var 
            reason = $("#reason").val(),
            images = $("#images_value").val(),
            note = $("#note").val();
            return common.request('{:url("order/refund_order")}', {id: '{$info.id}',reason:reason,images:images,note:note,type:'{$type}'});
        });
    }
</script>
</html>